1. Field of the Invention
The present invention generally relates to the area of 3-dimensional (3D) image processing and more particularly relates to methods and systems for generating patches and texture mapping therefor.
2. Description of the Related Art
Three-dimensional (3D) models of objects can provide information useful for a variety of applications such as generating computer aided design models from physical objects in product designs, outlining biological structures or organs in medical research and generating digital characters for computer games. Nevertheless, the creation of the 3D models has in the past required highly skilled professionals, extensive artistic knowledge, expensive modeling equipment and laborious efforts.
With the popularity of personal computers and the rapid emergence of the Internet and the World Wide Web (www), there are increasing demands from non-professionals for 3D modeling systems that require no extensive knowledge to operate. For example, a business may need to generate 3D models of its products and present them on its www site to attain its e-commence presence. A game developer may need to create a 3D model of a physical object to use as a realistic character in a computer game. A child may want to generate a 3D image of one of his/her favorite new toys to share by the Internet with a relative living remotely. The various applications and demands have proclaimed features of such 3D modeling systems that must be low in cost and easy in operation.
One of the commonly used 3D modeling systems is a triangulation system projecting beams of laser light onto an object. Ordinarily, the reflected light bounces off the object at an angle relative to the light source. The system employing an imaging system collects the reflection information from a different location relative to the light source and then determines the coordinates of the point or points of reflection by triangulation. A single dot system projects a single beam of light which, when reflected, produces a single dot of reflection. A scanning line system sends a plane of light against the object, the plane of light is reflected as a curvilinear-shaped set of points describing one contour line of the object. The location of each point in that curvilinear set of points can be determined by triangulation. The accuracy of the systems may be high but the systems are costly. The triangulation in the systems requires a precise configuration between the light source and the imaging system. Further the digitizing speed is usually slow when the object is large in size and limited by the mechanics of the scanning system.
Another commonly used 3D modeling approach is a stereoscopic system employing one or more imaging systems located at known locations or distances from each other to take multiple images of a 3D object. The captured images are processed with a pattern recognition system that corresponds the various points of the object in the multiple images and triangulates to extract depth information of these points, thereby obtaining the shape/contour information of the 3D object.
The above systems are either costly or require substantial knowledge to operate and not applicable in many applications that can not afford the cost and complexity. It is therefore a great need for a 3D modeling system that is easy to set up, virtually anywhere within minutes, and operated together with a personal computer, to scan and measure a 3D object and electronically replicate a fully-textured 3D model of the object.
Many 3D modeling systems are not designed to image the bottom of a 3D object that is often assumed black or a color extended from what is on the bottom portion of the object. Consequently, the 3D model loses its realism when its bottom is caused to be displayed. In other situations, a user wants to modify the final 3D model so that it can be presented in a desired manner. There is thus another need for a mechanism that permits a user to alter or modify portions of the 3D model independently.
The present invention has been made in consideration of the above described problems and needs and has particular applications for a 3D modeling system that can be used to generate fully-textured models of objects. According to one aspect of the present invention, exportable patches representing an entire triangles-based mesh model are respectively generated using a test-and-merge procedure. A patch is a collection of the triangles with the property that every triangle in the patch shares at least one edge with some other triangle in the same patch. In addition, all patches have the properties that the union of all the patches contains all the triangles of the mesh, and that no two patches contain the same triangle. Exporting such patches in image files makes it possible for a user to alter or modify the texture mapping for a particular patch in a desirable way.
The invention can be implemented in numerous ways, including a method, a system and a computer readable medium containing program code for automatically generating a fully-textured 3D model of an object without extensive knowledge, intensive labors and expensive equipment. The advantages of the invention are numerous. Different embodiments or implementations may yield one or more of the following unique features.
One of the important features in the texture mapping disclosed herein is the generation of patches with contiguous texture mapping without user intervention. Rather than mapping texture to each of the polygons of the mesh model, the process chooses to map the texture from every triangle into a respective portion of the texture image. Another important feature is a mechanism provided to export the patches in a commonly used image file format that can be subsequently modified independently with an image processing application. Still, as another important feature, the texture mapping process described herein can be implemented to take advantage of the graphics accelerator architecture commonly in most computer systems. Redirecting the graphics accelerator to draw into a buffer in memory rather than the buffer for the monitor can yield a much more efficient mapping of the textures, hence high performance of the overall system.
Other advantages, objects and features of the present invention, together with the foregoing, are attained in the exercise of the invention in the following description and resulting in the embodiment illustrated in the accompanying drawings.